# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=poxml
pkgver=24.02.2
pkgrel=0
arch="all !armhf !riscv64"
url="https://www.kde.org/applications/development/"
pkgdesc="Translates DocBook XML files using gettext po files"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	gettext-dev
	kdoctools5-dev
	qt5-qtbase-dev
	samurai
	"
subpackages="$pkgname-doc"
_repo_url="https://invent.kde.org/sdk/poxml.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/poxml-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
94552451f0f85fb1928c61cb3a6e41e64736ed463b0201e0ffe750f7a38e5849532f669368de59b00dbe57f18a56dde48fcb1adf231862a66ecc3092e180f37c  poxml-24.02.2.tar.xz
"
